import request from '@/utils/request'

export function getCategoryListApi (data) {
  return request({
    url: '/api/product.category/index',
    method: 'post',
    data
  })
}

export function getCategoryPickerApi (data) {
  return request({
    url: '/api/product.category/picker',
    method: 'post',
    data
  })
}

export function readCategoryApi (data) {
  return request({
    url: '/api/product.category/read',
    method: 'post',
    data
  })
}

export function createCategoryApi (data) {
  return request({
    url: '/api/product.category/create',
    method: 'post',
    data
  })
}

export function editCategoryApi (data) {
  return request({
    url: '/api/product.category/save',
    method: 'post',
    data
  })
}

export function setDefaultCategoryApi (data) {
  return request({
    url: '/api/product.category/setDefault',
    method: 'post',
    data
  })
}


export function deleteCategoryApi (data) {
  return request({
    url: '/api/product.category/delete',
    method: 'post',
    data
  })
}

export function getUnsaleableApi( data) {
  return request({
    url: '/api/product.category/unsaleable',
    method: 'post',
    data
  })
}